def printFetchUrl(url):
    print("fetch url:", url);

# def merge2Dicts(dic1, dic2, primaryKey):
#     # type: (dict, dict, string) -> dict
#     result = dict();
#     for key in dic1.keys():
#         if key in dic2.keys():
#             # 合并同类项
#             x_value = dic1[key];
#             y_value = dic2[key];

def merge_two_dicts(x, y):
    # type: (dict, dict) -> dict
    z = dict()
    for key in x.keys():
        if key in y.keys():
            # 合并同类项
            x_value = x[key]
            y_value = y[key]
            if isinstance(x_value, dict) and isinstance(y_value, dict):
                result_x_y = merge_two_dicts(x_value, y_value)
            else:
                result_x_y = y_value
            z[key] = result_x_y
        else:
            z[key] = x[key]

    for key in y.keys():
        if key in x.keys():
            # 合并同类项
            x_value = x[key]
            y_value = y[key]
            if isinstance(x_value, dict) and isinstance(y_value, dict):
                result_x_y = merge_two_dicts(x_value, y_value)
            else:
                result_x_y = y_value
            z[key] = result_x_y
        else:
            z[key] = y[key]

    return z
